﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="QuestionAnswers.aspx.vb" Inherits="Prototype.QuestionAnswers" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <br />
    <asp:TextBox ID="Tb_question" runat="server" TextMode="MultiLine"></asp:TextBox>
    <br />
    <br />
    <asp:TextBox ID="Tb_qa" runat="server" TextMode="MultiLine"></asp:TextBox>
    <br />
    <asp:Button ID="Btn_submit" runat="server" Text="Submit Answer" />
    <br />
<br />
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
        DataSourceID="SqlDataSource1">
        <Columns>
            <asp:BoundField DataField="UserFkId" HeaderText="UserFkId" 
                SortExpression="UserFkId" />
            <asp:BoundField DataField="Answers" HeaderText="Answers" 
                SortExpression="Answers" />
            <asp:BoundField DataField="CreatedDate" HeaderText="CreatedDate" 
                SortExpression="CreatedDate" />
        </Columns>
    </asp:GridView>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:booksConn %>" 
        ProviderName="<%$ ConnectionStrings:booksConn.ProviderName %>" 
        SelectCommand="SELECT [UserFkId], [Answers], [CreatedDate] FROM [QuestionAnswer] WHERE ([QuestFkId] = ?)">
        <SelectParameters>
            <asp:QueryStringParameter Name="QuestFkId" QueryStringField="ID" Type="Int32" />
        </SelectParameters>
    </asp:SqlDataSource>
</asp:Content>
